<!--Copyright (C) Kherty.  All rights reserved.-->
<ResourceDictionary
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    x:Class="OpenLS.UI.Themes.ListBoxItemResources"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns:oui="clr-namespace:OpenLS.UI"
    >
  <Style TargetType="{x:Type ListBoxItem}" x:Key="{x:Static oui:Styles.RibbonListBoxItemStyleKey}">
    <Setter Property="HorizontalContentAlignment" Value="{Binding HorizontalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, Mode=FindAncestor, AncestorType={x:Type ItemsControl}}}"/>
    <Setter Property="VerticalContentAlignment" Value="{Binding VerticalContentAlignment, RelativeSource={RelativeSource AncestorLevel=1, Mode=FindAncestor, AncestorType={x:Type ItemsControl}}}"/>
    <Setter Property="Padding" Value="3"/>
    <Setter Property="Background" Value="#00FFFFFF"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type ListBoxItem}">
          <Border Background="{TemplateBinding Background}" x:Name="Bd" SnapsToDevicePixels="True"
                BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"
                Padding="{TemplateBinding Padding}"
                      >
            <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}" x:Name="ContentPresenter" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"
                              Content="{TemplateBinding Content}" ContentTemplate="{TemplateBinding ContentTemplate}"/>
          </Border>
          <ControlTemplate.Triggers>
            <Trigger Property="IsMouseOver" Value="True">
              <Setter Property="Background" Value="{DynamicResource {x:Static oui:OfficeBrushes.ComboBoxArrowHoverBackgroundKey}}" TargetName="Bd"/>
              <Setter Property="BorderBrush" Value="{DynamicResource {x:Static oui:OfficeBrushes.ComboBoxArrowHoverBorderBrushKey}}" TargetName="Bd"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="False">
              <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

</ResourceDictionary>